VB5 Control Creation Edition AXButton ActiveX Control Sample |
| Home | Site Map |
|
The button below is a control created by the Control Creation Edition of Visual Basic 5.0. The control is highlighted whenever the mouse moves over it. In addition, the image displayed is downloaded asynchronously by VB5. Use the control panel below to observe the events fired by the button, and to modify the image URL. A brief explanation of the code and control is available.
Picture URL |
|||
Event Monitor |
The URLPicture Property
The image displayed by the button control is obtained from the URL specified in the button's
URLPicture property. When this property is changed, the button control retrieves the new image
and displays it.
The code behind the Change URL button changes the URL property to what has been entered in the text box:
Sub btnChange_onClick AXButton.URLPicture = txtPicURL.Value End SubThe MouseDown, MouseUp, and MouseMove Events
Sub AXButton_MouseDown(Button, Shift, X, Y) txtLastEvent.Value = "MouseDown(Button:= " & Button & ", Shift:= " & Shift & ", X:= " & X & ", Y:= " & Y & ")" End Sub Sub AXButton_MouseUp(Button, Shift, X, Y) txtLastEvent.Value = "MouseUp(Button:= " & Button & ", Shift:= " & Shift & ", X:= " & X & ", Y:=" & Y & ")" End Sub Sub AXButton_MouseMove(Button, Shift, X, Y) txtLastEvent.Value = "MouseMove(Button:= " & Button & ", Shift:= " & Shift & ", X:= " & X & ", Y:=" & Y & ")" End Sub